<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DataEase 嵌入 demo</title>

    <script>
        function logoutDataEase(){
            document.getElementsByTagName("iframe")[0].src = "/dataease/logout";
        }
        function loginDataEase(){
            document.getElementsByTagName("iframe")[0].src = "/dataease";
        }
    </script>

    <style>
        body {
            font-size: 14px;
            font-weight: 500;
        }
        iframe {
            width: calc(100vw - 20px);
            height: calc(100vh - 73px);
            box-shadow: 2px 2px 4px 2px rgb(54 58 80 / 12%);
            border: 1px solid #ddd;
        }
        button {
            margin: 5px 0;
        }
    </style>
</head>
<body>
<span>没有域名，想通过 IP 跨域访问请参考此链接：<a href="/jump-demo.html" target="_blank">前端跨域 Cookie 示例</a></span><br/>
<span>下面是使用后端模拟登录同域场景下嵌入的 DataEase 系统：</span><br/>
<button onclick="loginDataEase()">登录 DataEase</button><button onclick="logoutDataEase()">登出 DataEase</button>
<br/>
<iframe src="/dataease"/>
</body>
</html>